<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" > 

<html>
<head>
<base href="<%=basePath%>">
<title>药品详情</title>
<link rel="stylesheet" href="./js/bootstrap-3.3.5-dist/css/bootstrap.css" type="text/css"/>
<link rel="stylesheet" href="./js/metisMenu/metisMenu.min.css">
<link rel="stylesheet" href="./css/sb-admin/sb-admin-2.css">
<link rel="stylesheet" href="./css/base.css">
<link rel="stylesheet" href="./css/illness.css">
<link rel="stylesheet" href="./js/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="./js/bootstrap-table/bootstrap-table.min.css">
<link rel="stylesheet" href="./js/bootstrap-multiselect/bootstrap-multiselect.css" type="text/css"/>
<link rel="stylesheet" href="./js/bootstrap-3.3.5-dist/css/bootstrap-datetimepicker.css">

<script type="text/javascript" src="./js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="./js/bootstrap-3.3.5-dist/js/bootstrap.js"></script>
<script type="text/javascript" src="./js/metisMenu/metisMenu.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script src="./js/bootstrap-table/bootstrap-table-all.min.js"></script>
<script src="./js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script src="./js/bootstrap-multiselect/bootstrap-multiselect.js"></script>
<script src="./js/bootstrap-jquery-plugin/jquery.bootstrap.js"></script>
<script src="./js/bootstrap-3.3.5-dist/js/bootstrap-datetimepicker.js"></script>
<script src="./js/bootstrap-3.3.5-dist/js/bootstrap-datetimepicker.zh-CN.js"></script>

</head>
<body>
	<jsp:include page="../template/head.jsp" />
	<jsp:include page="../template/leftnav.jsp" />
	<div id="page-wrapper">
		<div class="wrapper">
			<h1><a href="./jsp/illness/illness.jsp">药品列表</a></h1><h3> <span> > </span> 药品详情</h3>
		</div>
		<div class="bHead">
			<ul class="list-inline">	
				<li>
					<span>药品名称：</span><span id="name">-</span>
				</li>
			</ul>
		</div>	
		<div class="i-detail i-detail-info">
				<h3>基本信息</h3>
		    	<p>【药品成分】<br><span id="ingredient">-</span></p>
		    	<p>【药品性状】<br><span id="traits">-</span></p>
		    	<p>【作用类别】<br><span id="effectType">-</span></p>
		    	<p>【适应&nbsp&nbsp&nbsp症】<br><span id="indications">-</span></p>
		    	<p>【药品规格】<br><span id="specification">-</span></p>
		    	<p>【用法用量】<br><span id="dosage">-</span></p>
		    	<p>【不良反应】<br><span id="adverseReactions">-</span></p>
		    	<p>【药品禁忌】<br><span id="taboo">-</span></p>
		    	<p>【注意事项】<br><span id="precautions">-</span></p>
		    	<p>【推荐价格】<br><span id="price">-</span></p>
		    	<p>【创建时间】<br><span id="createdTime">-</span></p>
		    	<p>【修改时间】<br><span id="modifyTime">-</span></p>
		    	<p>【创建&nbsp&nbsp&nbsp人】<br><span id="oper">-</span></p>
		</div>
		
</body>
<script type="text/javascript">
	var name = $.getUrlParam("name");
	$("#name").html(name);
	
	$(function (){
		$.ajax({
           url: "./medicine/getDetail",
           data: {
               name: name
           },
           type: "GET",
           dataType: 'json',
           cache: false,
           success: function (ret) {
             	$("#name").html(ret.name);
           		$("#ingredient").html(ret.content.ingredient);
           		$("#traits").html(ret.content.traits);
           		$("#effectType").html(ret.content.effectType);
           		$("#indications").html(ret.content.indications);
           		$("#specification").html(ret.content.specification);
           		$("#dosage").html(ret.content.dosage);
           		$("#adverseReactions").html(ret.content.adverseReactions);
           		$("#taboo").html(ret.content.taboo);
           		$("#precautions").html(ret.content.precautions);
           		$("#price").html(ret.content.price);
           }
       });
	});
</script>
</html>
